package com.sdyeda.readiot.fx;

import java.io.IOException;

import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Modality;
import javafx.stage.Stage;

public class ReadDialog {
	
	private ReadDialogController readdialogcontroller;
	
	public ReadDialog(Stage stage, Stage parentstage) {
		FXMLLoader loader = new FXMLLoader(getClass().getResource("ReadDialog.fxml"));
		
		try {
			stage.setScene(new Scene(loader.load()));
			

			stage.setTitle("尾矿库自动数据采集系统--读取/调零");
			stage.getIcons().add(new Image(MainWindow.class.getResourceAsStream("/logo.png")));
			stage.initOwner(parentstage);
			stage.initModality(Modality.WINDOW_MODAL);
			stage.setResizable(false);
			
			setReaddialogcontroller(loader.getController());
			readdialogcontroller.setStage(stage);
		
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

	public ReadDialogController getReaddialogcontroller() {
		return readdialogcontroller;
	}

	public void setReaddialogcontroller(ReadDialogController readdialogcontroller) {
		this.readdialogcontroller = readdialogcontroller;
	}

}
